﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SubjectGroup.cs" company="ELEN 7045 GROUP II">
//   Contributed by E.Vosloo
// </copyright>
// <summary>
//   The SubjectGroup class of the StudyDefinition entity module.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Domain.StudyDefinition.Entities
{
    #region

    using System.Collections.ObjectModel;

    #endregion

    /// <summary>
    /// The SubjectGroup class of the Study definition entity module.
    /// </summary>
    public class SubjectGroup
    {
        #region Properties

        /// <summary>
        /// Gets or sets the id of the subject group.
        /// </summary>
        /// <value>
        /// The id of the subject group.
        /// </value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the name of the subject group.
        /// </summary>
        /// <value>
        /// The name of the subject group.
        /// </value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the subjects associated with the subject group.
        /// </summary>
        /// <value>
        /// The subjects.
        /// </value>
        public Collection<Subject> Subjects { get; set; }

        #endregion

        #region Public Methods

        /// <summary>
        /// Adds the subject.
        /// </summary>
        /// <param name="subject">
        /// The subject.
        /// </param>
        public void AddSubject(Subject subject)
        {
            if (this.Subjects.Contains(subject))
            {
                return;
            }

            this.Subjects.Add(subject);
        }

        #endregion

        // public Collection<Location> Locations { get; set; }
        // public Location OccupiedLocation { get; set; }
    }
}
